home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / internet / sting / time / t_setclk / t_setclk.s < prev   
Text File  |  1997-08-09  |  20KB  |  728 lines

  1. ;----------------------------------------------------------------------------
  2. ;File name:    T_SETCLK.S            Revision date:    1997.08.09
  3. ;Creator:    Ulf Ronald Andersson        Creation date:    1997.08.01
  4. ;(c)1996 by:    Ulf Ronald Andersson        All rights reserved
  5. ;----------------------------------------------------------------------------
  6. ;Required header declarations:
  7. ;
  8.     .include    "uran\STRUCT.SH"    ;PASM adapted structures
  9.     .include    "uran\URAn_SYS.SH"    ;Main system definitions
  10.     .include    "uran\URAn_LA.SH"    ;Line A variables etc
  11.     .include    "uran\URAn_DOS.SH"    ;GEMDOS, BIOS, XBIOS
  12.     .include    "uran\URAn_GEM.SH"    ;VDI & AES
  13.     .include    "uran\URAn_SIM.SH"    ;some AES funcs for TOS/TTP
  14.     .include    "uran\URAn_APP.SH"    ;General application support
  15.     .include    "uran\URAn_JAR.SH"    ;Cookie jar handling
  16.     .include    "uran\URAn_AV.SH"    ;AV/VA protocol + MP protocol
  17. ;
  18.     .include    "sting\LAYER.SH"    ;only used by servers
  19.     .include    "sting\TRANSPRT.SH"    ;used by servers/clients
  20.     .include    "sting\NET_TCON.SH"    ;handles network time conv.
  21.     .include    "sting\DOMAIN.SH"    ;handles domain name/ip conv.
  22. ;
  23. ;----------------------------------------------------------------------------
  24. ;
  25. DAY_TIME_PORT    equ    13
  26. NET_TIME_PORT    equ    37
  27. TOS_NORMAL    equ    0
  28. BUF_SIZE    equ    500
  29. MAX_VA_ARGLEN    equ    512
  30. ;
  31. ;----------------------------------------------------------------------------
  32. ;
  33. ;;;huge_program        = 1    ;uncomment if TEXT+DATA sections are > 32KB
  34. ;;;keep_windows        = 1    ;uncomment to keep ACC vwk in main eventloop
  35. exec_timeout        = 1000    ;uncomment to enable timer in main eventloop
  36. exec_message        = 1    ;uncomment for messages in main eventloop
  37. ;
  38. ;----------------------------------------------------------------------------
  39. ;
  40.     .text
  41. ;
  42.     start_app
  43. ;
  44. ;----------------------------------------------------------------------------
  45. ;
  46.     .ifeq    huge_program
  47.     .data
  48.     .endif
  49. ;
  50. acc_name:
  51.     dc.b    '  T_SetClk',NUL    ;for ACC menu registration
  52.     dc.b    NUL
  53.     even
  54. ;
  55. id_app_name_s:
  56.     dc.b    'T_SETCLK',NUL
  57.     even
  58. ;
  59. ;----------------------------------------------------------------------------
  60. ;
  61.     .ifeq    huge_program
  62.     .bss
  63.     .endif
  64. ;
  65. message:    ds.w    8        ;evnt_mesag message pipe
  66. intin:        ds.w    30        ;30 words or more for AES/VDI
  67. intout:        ds.w    45        ;45 words or more for AES/VDI
  68. ptsin:        ds.w    30        ;30 words or more for VDI
  69. ptsout:        ds.w    12        ;12 words or more for VDI output coordinates
  70.         ds.l    200        ;subroutine stack >= 100 longs
  71. mystack:    ds.l    1        ;top of subroutine stack
  72. ;
  73. ;----------------------------------------------------------------------------
  74. ;
  75.     .text
  76. ;
  77. ;----------------------------------------------------------------------------
  78. ;    Constants, Variables, and Usage of the URAn_APP.S library
  79. ;
  80. ;rz        'relative zero' for internal references
  81. ;basepage_p    -> program's base page
  82. ;tsr_size    .L size of BASEPAGE+TEXT+DATA+BSS  (only TOS/TTP may TSR)
  83. ;progtype    .L indicates program type:
  84. ;  ...            $0000.$FFFF == TOS/TTP/boot_PRG
  85. ;  ...            $0000.ap_id == APP/GTP/non_boot_PRG
  86. ;  ...            $FFFF.ap_id == ACC
  87. ;acc_flag    is the high word of 'progtype'
  88. ;tos_flag    is the low word of 'progtype'
  89. ;bootflag    .W $FFFF == PRG booted from AUTO (also sets 'tos_flag')
  90. ;menu_id    .W menu id for an ACC, otherwise null
  91. ;g_handle    .W workstation handle for ACC/APP/GTP/non_boot_PRG
  92. ;vwk_handle    .W virtual workstation handle
  93. ;contrl        12 words for AES/VDI control data
  94. ;
  95. ;wk_x_rez \
  96. ;wk_y_rez  \/ from
  97. ;wk_pix_w  /\ opnvwk
  98. ;wk_pix_h /
  99. ;
  100. ;MiNT_p        .L NULL or -> MiNT structure
  101. ;MagX_p        .L NULL or -> MagX structure
  102. ;nAES_p        .L NULL or -> nAES structure
  103. ;Gnva_p        .L NULL or -> Gnva structure
  104. ;
  105. ;line_a_base_p    .L -> line_a variable base
  106. ;kbshift_p    .L -> kbshift byte of OS
  107. ;currbp_p_p    .L -> OS var -> current basepage
  108. ;
  109. ;NB: if symbol 'huge_program' is defined, above data is in TEXT section (else in BSS)
  110. ;NB: defining 'huge_program' also makes function calls use 'jsr' (instead of bsr)
  111. ;
  112. ;Required user routines:
  113. ;
  114. ;init_app    called for ACC/APP/GTP/non_boot_PRG to init application,
  115. ;        but doesn't need appl_init, graf_handle, or v_opnvwk,
  116. ;        nor does an ACC need menu_register.
  117. ;        Suitable use is for initialization of object trees.
  118. ;NB:  for ACC    menu_register is called between init_app and exec_app
  119. ;
  120. ;exec_app    called to execute the main application regardless of type,
  121. ;        but doesn't need v_clsvwk, or appl_exit, or ACC appl_mesag.
  122. ;        This call will be repeated for a reactivated ACC.
  123. ;        Non_acc programs should have exit code in d0 at RTS.
  124. ;        (See details at 'Exit codes:' below)
  125. ;
  126. ;    At entry to either of these two routines:
  127. ;
  128. ;        d6.W    == bootflag    \
  129. ;        d7.L    == progtype     > See descriptions above.
  130. ;        a6.L    == rz        /
  131. ;
  132. ;Optional user routines:
  133. ;
  134. ;exec_timer    Called for ACC that has a defined constant 'exec_timeout',
  135. ;        whenever evnt_multi produces such a timer event.
  136. ;        The constant is placed as long at 'main_timeout', and may
  137. ;        there be dynamically adjusted by the program.
  138. ;
  139. ;exec_mesag    Called for ACC that has a defined constant 'exec_message',
  140. ;        whenever evnt_multi/evnt_mesag produces messages that are
  141. ;        not AC_OPEN  (such as VA_START).
  142. ;
  143. ;        If the constant 'keep_windows' is also set, the workstation
  144. ;        will not be closed at each return (you must obey AC_CLOSE).
  145. ;        This places a word == $FF00 at 'keep_wind_f', and if the top
  146. ;        byte is cleared the workstation closure is enabled again.
  147. ;
  148. ;NB:    Top bit of the word 'revise_type_f' is used for 3 purposes:
  149. ;   1:    Let ACC start 'exec_app' directly without awaiting event.
  150. ;   2:    Let APP delay 'exec_app' until an event occurs.
  151. ;   3:    Let APP loop back for more events after 'exec_app'
  152. ;The flag must be set by 'init_app' in the first two cases, and in case 3
  153. ;should be set/cleared in 'exec_app' to decide whether to exit program.
  154. ;
  155. ;Exit codes:    At exit from exec_app, d0 has the following effects
  156. ;        when the program was not started as accessory.
  157. ;
  158. ; negative    => Pterm(d0)            => error code exit
  159. ; 0        => Pterm(d0)            => error free exit
  160. ; 0x0000ADD0    => Ptermres(tsr_size,0)        => error free resident exit
  161. ; 0x0000ADD1    => Ptermres(d1,0)        => error free resident exit
  162. ; 0x0000ADD2    => Ptermres(d1,d2)        => error code resident exit
  163. ;
  164. ;----------------------------------------------------------------------------
  165. ;Start of:    init_app
  166. ;----------------------------------------------------------------------------
  167. ;
  168. init_app:
  169. ;
  170.     include        "uran\URAn_ARG.S"        ;load ARGV handler
  171. ;
  172. ; Here URAn_ARG.S defines two variables
  173. ;
  174. ;arg_cnt    == number of strings on command line
  175. ;arg_ptr    -> NUL_separated argument strings + final NUL
  176. ;
  177. ;NB:    Both of the above include a dummy program name (first string==NUL).
  178. ;-------
  179.     clr.l        VA_arg_p
  180.     cmp        #2,arg_cnt
  181.     blo.s        .done_arg
  182.     move.l        arg_ptr,a0
  183.     str_pass    a0
  184.     move.l        a0,VA_arg_p
  185. .done_arg:
  186. ;
  187.     st        fatal_f            ;assume fatal errors can happen
  188.     gemdos        Super,0.w
  189.     move.l        d0,d4
  190.     eval_cookie    #"STiK"
  191.     move.l        d0,d3            ;d3 = d0 -> DRV_LIST structure
  192.     gemdos        Super|_ind,d4
  193.     move.l        d3,sting_drivers    ;sting_drivers -> DRV_LIST structure
  194.     ble.s        .STiK_not_found
  195.     move.l        d3,a3            ;a3 -> DRV_LIST structure
  196.     lea        DRV_LIST_magic(a3),a0
  197.     lea        STiKmagic_s(pc),a1
  198.     moveq        #10-1,d0
  199. .strcmp_loop:                    ;loop to test STiKmagic of DRV_LIST
  200.     cmpm.b        (a0)+,(a1)+
  201.     dbne        d0,.strcmp_loop
  202.     bne.s        .STiK_not_valid
  203. ;
  204.     move.l        DRV_LIST_get_dftab(a3),a0    ;a0 -> get_dftab function
  205.     pea        TRANSPORT_DRIVER_s        ;-(sp) = "TRANSPORT_TCPIP"
  206.     jsr        (a0)                ;call get_dftab
  207.     addq        #4,sp
  208.     move.l        d0,tpl                ;store pointer in 'tpl'
  209.     ble.s        .driver_not_valid
  210. ;
  211.     move.l        DRV_LIST_get_dftab(a3),a0    ;a0 -> get_dftab function
  212.     pea        MODULE_DRIVER_s            ;-(sp) = "MODULE_LAYER"
  213.     jsr        (a0)                ;call get_dftab
  214.     addq        #4,sp
  215.     move.l        d0,stx                ;store pointer in 'tpl'
  216.     ble.s        .layer_not_valid
  217.     clr        fatal_f
  218. ;
  219. ;Add client/server dependent init here
  220. ;
  221.     clr.l        initerr_mess_p
  222.     rts
  223. ;
  224. .STiK_not_found:
  225.     lea        STiK_not_found_al_s(pc),a0
  226.     bra.s        .init_error
  227. ;
  228. .STiK_not_valid:
  229.     lea        STiK_not_valid_al_s(pc),a0
  230.     bra.s        .init_error
  231. ;
  232. .driver_not_valid:
  233.     lea        driver_not_valid_al_s(pc),a0
  234.     bra.s        .init_error
  235. ;
  236. .layer_not_valid:
  237.     lea        layer_not_valid_al_s(pc),a0
  238. .init_error:
  239.     move.l        a0,initerr_mess_p
  240.     rts
  241. ;
  242. ;----------------------------------------------------------------------------
  243. ;End of:    init_app
  244. ;----------------------------------------------------------------------------
  245. ;Start of:    exec_app
  246. ;----------------------------------------------------------------------------
  247. ;
  248. exec_app:
  249.     move.l        initerr_mess_p,d3
  250.     beq.s        no_init_err
  251.     move.l        d3,a3
  252.     sim_aes        form_alert,#1,(a3)
  253.     tst        fatal_f
  254.     bne        exit_exec_err
  255. no_init_err:
  256.     tst.w        d7            ;GEM/TOS program ?
  257.     bmi.s        exec_TOS        ;go run TOS/TTP routines
  258. exec_GEM:
  259.     tst.l        d7            ;APP/ACC program ?
  260.     bmi        exec_multi_GEM        ;go run ACC routines
  261.     cmp        #1,global+2        ;Singletasking APP ?
  262.     beq.s        exec_single_GEM        ;go run singletasking GEM code
  263. exec_multi_APP:
  264.     btst        #7,revise_type_f    ;been here before ?
  265.     bne        exec_multi_GEM        ;then behave like an ACC this time
  266.     tst.l        d3            ;init_error ?
  267.     bne        exit_exec_err        ;go exit program on init errors (bad STiK etc)
  268.     bset        #7,revise_type_f    ;tell main loop to behave like ACC
  269.     cmp        #1,arg_cnt        ;any arguments for this APP
  270.     bgt        exec_multi_GEM        ;then start directly
  271.     bra        exit_exec_ok        ;exit to main event loop
  272. ;
  273. ;-------------------------------------
  274. ;
  275. exec_TOS:
  276. exec_single_GEM:
  277.     bsr        close_channel
  278.     bsr        find_time_server
  279.     bmi        exit_exec_ok
  280.     bsr        ask_protocol
  281.     bmi        exit_exec_ok
  282.     bsr        resolve_time_server
  283.     bmi        resolve_error
  284.     bsr        send_request
  285.     bmi        send_error
  286.     move.l        #5000,d0    
  287.     bsr        await_time_service
  288.     move.l        d0,d3
  289.     bsr        close_channel
  290.     move.l        d3,d0
  291.     bmi        wait_error
  292.     beq        timeout_error
  293.     bra        exit_exec_ok
  294. ;
  295. exec_multi_GEM:
  296.     bsr        close_channel
  297.     bsr        find_time_server
  298.     bmi        exit_exec_ok
  299.     bsr        ask_protocol
  300.     bmi        exit_exec_ok
  301.     move.l        #10000,main_timeout
  302. new_request:
  303.     bsr        resolve_time_server
  304.     bpl.s        have_server_ip
  305. resolve_error:
  306.     sim_aes        form_alert,#1,unresolved_al_s(pc)
  307.     bra        exit_exec_ok
  308. ;
  309. have_server_ip:
  310.     bsr        send_request
  311.     bpl.s        request_sent
  312. send_error:
  313.     bsr        close_channel
  314.     sim_aes        form_alert,#1,send_error_al_s(pc)
  315.     bra        exit_exec_ok
  316. ;
  317. request_sent:
  318.     TIMER_now
  319.     move.l        d0,send_time
  320.     move.l        #100,main_timeout
  321.     bra        exit_exec_ok
  322. ;
  323. ;-------------------------------------
  324. ;
  325. ;
  326. exec_APP_error:        ;jump here to display alert (a3) and then exit
  327.     sim_aes        form_alert,#1,(a3)    ;NB: has simulation for TOS/TTP
  328. exit_exec_err:        ;jump here to exit with error code -1
  329.     moveq        #-1,d0
  330. exit_terminate:        ;jump here to exit with error code in d0
  331.     move.l        d0,d3
  332.     bclr        #7,revise_type_f
  333. ;
  334. ;Add client/server dependent termination code here
  335. ;
  336.     move.l        d3,d0
  337.     bra.s        exit_exec_app
  338. ;
  339. ;-------------------------------------
  340. ;
  341. exit_exec_ok:
  342.     clr.l    d0
  343. exit_exec_app:
  344.     rts
  345. ;
  346. ;----------------------------------------------------------------------------
  347. ;End of:    exec_app
  348. ;----------------------------------------------------------------------------
  349. ;Start of:    exec_timer
  350. ;----------------------------------------------------------------------------
  351. ;
  352.     .ifne    exec_timeout    ;cond:    ifne exec_timeout
  353. exec_timer:
  354.     tst    handle
  355.     ble    exit_exec_timer
  356.     TIMER_elapsed    send_time
  357.     cmp.l        #10000,d0
  358.     blo.s        not_timed_out
  359.     bsr        close_channel
  360.     move.l        #10000,main_timeout
  361. timeout_error:
  362.     sim_aes        form_alert,#1,timeout_al_s(pc)
  363.     cmp        #1,d0    ;[ Ok ] button
  364.     beq        exec_app
  365.     bra.s        exit_exec_timer
  366. ;
  367. not_timed_out:
  368.     move.l        #10,d0    
  369.     bsr        await_time_service
  370.     beq.s        exit_exec_timer        ;continue waiting
  371.     move        d0,d3
  372.     move.l        #10000,main_timeout
  373.     tst        d3
  374.     bpl.s        exit_exec_timer
  375. wait_error:
  376.     sim_aes        form_alert,#1,wait_error_al_s(pc)
  377. exit_exec_timer:
  378.     clr.l        d0
  379.     rts
  380.     .endif            ;ends:    ifne exec_timeout
  381. ;
  382. ;----------------------------------------------------------------------------
  383. ;End of:    exec_timer
  384. ;----------------------------------------------------------------------------
  385. ;Start of:    exec_mesag
  386. ;----------------------------------------------------------------------------
  387. ;
  388.     .ifne        exec_message
  389. exec_mesag:
  390.     cmp        #AC_CLOSE,message
  391.     bne.s        .not_AC_CLOSE
  392.     sf        keep_wind_f
  393.     bra        exit_exec_mesag
  394. ;
  395. .not_AC_CLOSE:
  396.     cmp        #AP_TERM,message
  397.     bne.s        .not_AP_TERM
  398.     tst.l        d7
  399.     bmi        exit_exec_mesag        ;AP_TERM is not for ACCs
  400.     clr.l        d0            ;flag no error
  401.     bra        exit_terminate
  402. ;
  403. .not_AP_TERM:
  404.     cmp        #VA_START,message
  405.     bne        .not_VA_START
  406.     st        VA_START_f
  407.     move        message+2,AV_partner_id
  408.     move.l        message+6,VA_START_cmd_p
  409.     AV_send        PROTOKOLL,#w_VA_START+w_AV_STARTED_A,id_app_name_s
  410. ;
  411.     move.l        VA_START_cmd_p(pc),a0    ;a0 -> argument on Venus
  412.     move.l        a0,a1            ;a1 -> argument on Venus
  413.     str_pass    a1
  414.     sub.l        VA_START_cmd_p(pc),a1
  415.     move.l        a1,d1            ;d1 = length of argument
  416.     move        #MAX_VA_ARGLEN,d0
  417.     cmp.l        d0,d1            ;argument too long ?
  418.     blo.s        .length_ok
  419.     move.l        d0,d1            ;limit argument length
  420. .length_ok:
  421.     move.b        -1(a0,d1.w),d0        ;save byte at termination point
  422.     clr.b        -1(a0,d1.w)        ;enforce limited termination
  423.     move.l        a0,a1            ;a1 -> argument on Venus
  424.     lea        VA_arg_s(pc),a2        ;a2 -> local argument area
  425.     move.l        a2,VA_arg_p        ;prep a pointer for future
  426.     str_copy    a1,a2            ;make a local copy of argument
  427.     move.b        d0,-1(a0,d1.w)        ;repair original copy
  428. ;
  429.     AV_send.i    STARTED,VA_START_cmd_p
  430.     bra        exec_app
  431. ;
  432. .not_VA_START:
  433.     cmp        #VA_PROTOSTATUS,message
  434.     bne.s        .not_VA_PROTOSTATUS
  435.     move        message+8,VA_protostatus
  436.     move        message+6,VA_protostatus+2
  437.     bra        exit_exec_mesag
  438. ;
  439. .not_VA_PROTOSTATUS:
  440. exec_mesag_extend:
  441. ;
  442. ;Add client/server dependent message event work here
  443. ;
  444. exit_exec_mesag:
  445.     rts
  446.     .endif        exec_message
  447. ;
  448. ;----------------------------------------------------------------------------
  449. ;End of:    exec_mesag
  450. ;----------------------------------------------------------------------------
  451. ;Start of:    subroutines
  452. ;----------------------------------------------------------------------------
  453. ;
  454. ask_protocol:
  455.     sim_aes        form_alert,#1,ask_protocol_al_s(pc)
  456.     cmp        #2,d0        ;UDP button ?
  457.     slo        TCP_f
  458.     bhi.s        .cancel
  459.     clr.l        d0        ;flag zero for TCP/UDP buttons
  460.     rts
  461. ;
  462. .cancel:
  463.     moveq        #-1,d0        ;flac -1 for Cancel button
  464.     rts
  465. ;
  466. ;----------------------------------------------------------------------------
  467. ;
  468. find_time_server:
  469.     lea        tcon_data(pc),a0
  470.     tcon_rd_zone
  471.     tcon_rd_summer
  472. ;
  473.     clr.l        time_server_ip
  474.     move.l        VA_arg_p(pc),d0
  475.     bsr        test_time_server
  476.     bne.s        .exit
  477. .try_TIME_SERVER_var:
  478.     getvstr        TIME_SERVER_vn_s(pc)
  479.     bsr        test_time_server
  480.     bne.s        .exit
  481.     sim_aes        form_alert,#1,time_server_not_valid_al_s(pc)
  482.     clr.l        d0
  483. .exit:
  484.     rts
  485. ;
  486. ;----------------------------------------------------------------------------
  487. ;
  488. test_time_server:
  489.     is_unblank.i    d0
  490.     move.l        a0,time_server_s_p
  491.     beq.s        .exit
  492.     is_dip        (a0)
  493.     move.l        a0,d0
  494.     beq.s        .exit
  495.     diptobip    (a0)
  496.     move.l        d0,time_server_ip
  497. .exit:
  498.     move.l        time_server_s_p(pc),d0
  499.     rts
  500. ;
  501. ;----------------------------------------------------------------------------
  502. ;
  503. resolve_time_server:
  504.     clr.l        d0
  505.     tst.l        time_server_ip
  506.     bne.s        .exit
  507.     resolve.i    time_server_s_p(pc),#0,#time_server_ip,#1
  508. .exit:
  509.     tst.l        d0
  510.     rts        
  511. ;
  512. ;----------------------------------------------------------------------------
  513. ;
  514. close_channel:
  515.     tst        handle
  516.     ble.s        .exit
  517.     tst        TCP_f
  518.     beq.s        .close_udp
  519. .close_tcp:
  520.     TCP_close    handle,#1
  521.     bra.s        .exit
  522. ;
  523. .close_udp:
  524.     UDP_close    handle
  525. .exit:
  526.     clr.l        handle
  527.     rts
  528. ;
  529. ;----------------------------------------------------------------------------
  530. ;
  531. send_request:
  532.     tst        TCP_f
  533.     beq.s        .send_UDP
  534.     TCP_open    time_server_ip,#NET_TIME_PORT,#TOS_NORMAL,#BUF_SIZE
  535.     move        d0,handle
  536.     bra        .exit
  537. ;
  538. .send_UDP:
  539.     UDP_open    time_server_ip,#NET_TIME_PORT
  540.     move        d0,handle
  541.     bmi.s        .exit
  542.     clr.l        buffer
  543.     UDP_send    d0,buffer(pc),#4
  544.     clr.l        d0
  545. .exit:
  546.     rts
  547. ;
  548. ;----------------------------------------------------------------------------
  549. ;
  550. await_time_service:
  551.     move.l        d0,max_delay
  552.     TIMER_now
  553.     move.l        d0,start_time
  554. ;
  555. .wait_loop:
  556.     _appl_yield
  557.     TIMER_elapsed    start_time
  558.     cmp.l        max_delay(pc),d0
  559.     bhs.s        .timed_out
  560.     CNbyte_count(handle)
  561.     cmp        #E_NODATA,d0
  562.     blt.s        .error
  563.     cmp        #4,d0
  564.     blt.s        .wait_loop
  565. ;
  566.     lea        tcon_data(pc),a3
  567.     CNget_block    handle,tcon_net_time(a3),#4
  568.     cmp        #4,d0
  569.     blt.s        .error
  570.     move.l        a3,a0
  571.     tcon_net2man
  572.     tcon_man2tos
  573.     tcon_tos2real        ;clock is set
  574.     bsr        close_channel
  575.     move        #4,d0    ;flag full time received
  576.     rts
  577. ;
  578. .timed_out:
  579.     clr.l        d0    ;flag no time received
  580.     rts
  581. ;
  582. .error:
  583.     bsr        close_channel
  584.     moveq        #-1,d0    ;flag error received
  585.     rts
  586. ;
  587. ;----------------------------------------------------------------------------
  588. ;End of:    subroutines
  589. ;----------------------------------------------------------------------------
  590. ;
  591.     make    SIM_links
  592.     make    JAR_links
  593.     make    TCON_links
  594.     make    DOMAIN_links
  595.     make    AV_links
  596. ;
  597. ;----------------------------------------------------------------------------
  598. ;
  599. text_limit:    .data
  600. ;
  601. ;----------------------------------------------------------------------------
  602. ;
  603. STiKmagic_s:
  604.     dc.b    'STiKmagic',NUL
  605. TRANSPORT_DRIVER_s:
  606.     dc.b    'TRANSPORT_TCPIP',NUL
  607. MODULE_DRIVER_s:
  608.     dc.b    'MODULE_LAYER',NUL
  609. ;
  610. STiK_not_found_al_s:
  611.     dc.b    '[3]['
  612.     dc.b    'STinG  T_SetClk time client: |'
  613.     dc.b    '-----------------------------|'
  614.     dc.b    'The STiK cookie is missing !]'
  615.     dc.b    '[ Abort ]',NUL
  616. ;
  617. STiK_not_valid_al_s:
  618.     dc.b    '[3]['
  619.     dc.b    'STinG  T_SetClk time client: |'
  620.     dc.b    '-----------------------------|'
  621.     dc.b    'The STiK cookie is corrupted!]'
  622.     dc.b    '[ Abort ]',NUL
  623. ;
  624. driver_not_valid_al_s:
  625.     dc.b    '[3]['
  626.     dc.b    'STinG  T_SetClk time client: |'
  627.     dc.b    '-----------------------------|'
  628.     dc.b    'TRANSPORT driver is missing !]'
  629.     dc.b    '[ Abort ]',NUL
  630. ;
  631. layer_not_valid_al_s:
  632.     dc.b    '[3]['
  633.     dc.b    'STinG  T_SetClk time client: |'
  634.     dc.b    '-----------------------------|'
  635.     dc.b    'MODULE driver is missing !]'
  636.     dc.b    '[ Abort ]',NUL
  637.     even
  638. ;
  639. ;
  640. TIME_SERVER_vn_s:
  641.     dc.b    'TIME_SERVER',NUL
  642. ;
  643. time_server_not_valid_al_s:
  644.     dc.b    '[3]['
  645.     dc.b    'STinG  T_DayTim time client: |'
  646.     dc.b    '-----------------------------|'
  647.     dc.b    'TIME_SERVER must be specified|'
  648.     dc.b    'in argument or STinG variable|'
  649.     dc.b    '(use domain or dotted IP num)]'
  650.     dc.b    '[ Abort ]',NUL
  651. ;
  652. unresolved_al_s:
  653.     dc.b    '[3]['
  654.     dc.b    'STinG  T_SetClk time client: |'
  655.     dc.b    '-----------------------------|'
  656.     dc.b    'TIME_SERVER address could not|'
  657.     dc.b    'be resolved at this time. It |'
  658.     dc.b    'may be error in DEFAULT.CFG !]'
  659.     dc.b    '[ Abort ]',NUL
  660. ;
  661. send_error_al_s:
  662.     dc.b    '[3]['
  663.     dc.b    'STinG  T_SetClk time client: |'
  664.     dc.b    '-----------------------------|'
  665.     dc.b    'An error occurred attempting |'
  666.     dc.b    'to send a request to the time|'
  667.     dc.b    'server !]'
  668.     dc.b    '[ Abort ]',NUL
  669. ;
  670. wait_error_al_s:
  671.     dc.b    '[3]['
  672.     dc.b    'STinG  T_SetClk time client: |'
  673.     dc.b    '-----------------------------|'
  674.     dc.b    'An error occurred in awaiting|'
  675.     dc.b    'a reply from the time server.]'
  676.     dc.b    '[ Abort ]',NUL
  677. ;
  678. ask_protocol_al_s:
  679.     dc.b    '[2]['
  680.     dc.b    'STinG  T_SetClk time client: |'
  681.     dc.b    '-----------------------------|'
  682.     dc.b    'Which protocol do you want to|'
  683.     dc.b    'use on this server request ? ]'
  684.     dc.b    '[ TCP | UDP | Cancel ]',NUL
  685. ;
  686. timeout_al_s:
  687.     dc.b    '[2]['
  688.     dc.b    'STinG  T_SetClk time client: |'
  689.     dc.b    '-----------------------------|'
  690.     dc.b    'Time server does not answer !|'
  691.     dc.b    'Click  Ok to make yet another|'
  692.     dc.b    'attempt to contact it.]'
  693.     dc.b    '[ Ok | Cancel ]',NUL
  694. ;
  695. ;----------------------------------------------------------------------------
  696. ;
  697. data_limit:    .bss
  698. ;
  699. ;----------------------------------------------------------------------------
  700. ;
  701. sting_drivers:    ds.l    1    ;DRV_LIST    *sting_drivers;
  702. tpl:        ds.l    1    ;TPL        *tpl;
  703. stx:        ds.l    1    ;STX        *stx;
  704. initerr_mess_p:    ds.l    1
  705. fatal_f:    ds.w    1
  706. VA_START_f:    ds.w    1
  707. VA_START_cmd_p:    ds.l    1
  708. VA_protostatus:    ds.l    1
  709. VA_arg_p:    ds.l    1
  710. VA_arg_s:    ds.b    MAX_VA_ARGLEN
  711.         even
  712. ;
  713. tcon_data:        ds.b    sizeof_tcon
  714. time_server_s_p:    ds.l    1
  715. time_server_ip:        ds.l    1
  716. TCP_f:            ds.w    1
  717. handle:            ds.w    1
  718. send_time:        ds.l    1
  719. start_time:        ds.l    1
  720. max_delay:        ds.l    1
  721. buffer:            ds.b    BUF_SIZE
  722. ;
  723. ;----------------------------------------------------------------------------
  724. bss_limit:    .end
  725. ;----------------------------------------------------------------------------
  726. ;End of file:    T_SETCLK.S
  727. ;----------------------------------------------------------------------------
  728.